Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 2 - Geometric Shapes / Geometric Shapes Reference
Functions / Editing Shape Geometries


GXSetShapePoints

You can use the GXSetShapePoints procedure to replace geometric points of a shape.

void GXSetShapePoints(gxShape target, long index, long count, 
                      const gxPoint data[]);
target
A reference to the shape containing the geometric points you want to replace.
index
The geometry index of the first geometric point to replace.
count
The number of the geometric points to replace.
data
An array of new geometric points.
DESCRIPTION
The GXSetShapePoints function changes the values of the number of geometric points specified in the count parameter, starting with the geometric point indicated by the index parameter, to the values specified by the data parameter.

Notice that this function replaces geometric points on a point-by-point basis; the number of points in the data parameter must match the value of the count parameter. You may not use the gxSelectToEnd constant for the count parameter.

If you provide an empty or full shape for the source shape, this function posts the error graphic_type_does_not_contain_points.

If you provide a source shape that is not one of the geometric shape types, this function performs the actions described in the following table:
Shape typeAction taken
bitmapSets bitmap position
picturePosts the error graphic_type_does_not_contain_points
textSets position of text shape
glyphSets glyph positions corresponding to range indicated by the index and count parameters
layoutSets position of layout shape

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
index_is_less_than_one(debugging version)
count_is_less_than_one(debugging version)
graphic_type_does_not_contain_points(debugging version)
shape_access_not_allowed(debugging version)
Warnings 
index_out_of_range_in_contour 
count_out_of_range 
SEE ALSO
For examples that use this function, see "Replacing Geometric Points" beginning on page 2-79.

For a discussion of geometric points, see the section "Shape Geometry" beginning on page 2-9.

To learn how this function works for typographic shape types, see Inside Macintosh: QuickDraw GX Typography.

To determine the geometry index of a particular geometric point within a shape, use the GXGetShapeIndex function, which is described on page 2-139.

To obtain a copy of a range of geometric points in a geometry, use the GXGetShapePoints function, which is described on page 2-140.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help